﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.Skins;
using DevExpress.LookAndFeel;
using DevExpress.UserSkins;
using DevExpress.XtraEditors;


namespace ePharmacyLauch
{
    public partial class Form1 : XtraForm
    {
        public Form1()
        {
            InitializeComponent();
        }
        private bool IsLoaded(string frm)
        {
            Form[] afrm = this.MdiChildren;
            foreach (Form f in afrm)
            {
                if (f.Name.Equals(frm)) { f.Activate(); return true; }
            }
            return false;
        }

        private void menuDmbd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (IsLoaded("Dmbd")) return;
            Dmbd frm = new Dmbd();
            frm.MdiParent = this;
            frm.Show();
        }

        private void menuXuatban_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (IsLoaded("Xuatban")) return;
            Xuatban frm = new Xuatban();
            frm.MdiParent = this;
            frm.Show();
        }

        private void menuGoi_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (IsLoaded("DmGoi")) return;
            DmGoi frm = new DmGoi();
            frm.MdiParent = this;
            frm.Show();
        }


    }
}